<?php
/**
 * Created by PhpStorm.
 * User: shuai
 * Date: 2016/7/27
 * Time: 20:59
 * 新手教程
 */
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_app_class('admin', 'admin', 0);
pc_base::load_app_class('foreground');
pc_base::load_sys_class('format', '', 0);
pc_base::load_sys_class('form', '', 0);
class tutorial extends admin {

    public function __construct() {
        $this->shuafen_tutorial = pc_base::load_model('shuafen_tutorial_model');
        parent::__construct();
    }


    public function content_manage(){
        if (isset($_POST['dosubmit'])) {
            $data['content'] = $_POST['content'];
            $this->shuafen_tutorial->update($data, array('id'=>$_POST['id']));
            showmessage(L('修改成功'), 'index.php?m=shuafen&c=tutorial&a=content_manage');
        }else{
            $tutorial = $this->shuafen_tutorial->get_one();
        }
        include $this->admin_tpl('content_manage/content_manage');
    }
}
